﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using FishWebLib;
using SGRapidForm.Common;

namespace SGRapidForm.Permission.Entity
{
    [DataContract]
    public class UserDetails : EntityBase
    {
        #region Fields

        private string _keyid = string.Empty;
        private string _deptkeyid = string.Empty;
        private string _deptcode = string.Empty;
        private string _deptname = string.Empty;
        private string _realname = string.Empty;
        private string _username = string.Empty;
        private string _password = string.Empty;
        private int? _passwordformat = 0;
        private string _passwordsalt = string.Empty;
        private string _mobilephone = string.Empty;
        private string _email = string.Empty;
        private string _passwordquestion = string.Empty;
        private string _passwordanswer = string.Empty;
        private bool _isapproved = false;
        private bool _islockedout = false;
        private DateTime? _lastlogindate = new DateTime(1900,1,1,0,0,0);
        private DateTime? _lastpasswordchangeddate = new DateTime(1900, 1, 1, 0, 0, 0);
        private DateTime? _lastlockoutdate = new DateTime(1900, 1, 1, 0, 0, 0);
        private int? _failedpasswordattemptcount = 0;
        private DateTime? _failedpasswordattemptwindowstart = new DateTime(1900, 1, 1, 0, 0, 0);
        private int? _failedpasswordanswerattemptcount = 0;
        private DateTime? _failedpasswordanswerattemptwindowstart = new DateTime(1900, 1, 1, 0, 0, 0);
        private string _remark = string.Empty;
        private string _createname = string.Empty;
        private DateTime? _createdate = DateTime.Now;
        private string _modifyname = string.Empty;
        private DateTime? _modifydate = new DateTime(1900,1,1,0,0,0);//SQL Server 日期最小值
        private string _sessionID = string.Empty;

        #endregion

        #region Properties

        [DataMember]
        public string Keyid
        {
            set { _keyid = value; }
            get { return _keyid; }
        }
        [DataMember]
        public string Realname
        {
            set { _realname = value; }
            get { return _realname; }
        }
        [DataMember]
        public string Username
        {
            set { _username = value; }
            get { return _username; }
        }
        [DataMember]
        public string Password
        {
            set { _password = value; }
            get { return _password; }
        }
        [DataMember]
        public int? PasswordFormat
        {
            set { _passwordformat = value; }
            get { return _passwordformat; }
        }
        [DataMember]
        public string PasswordSalt
        {
            set { _passwordsalt = value; }
            get { return _passwordsalt; }
        }
        [DataMember]
        public string MobilePhone
        {
            set { _mobilephone = value; }
            get { return _mobilephone; }
        }
        [DataMember]
        public string Email
        {
            set { _email = value; }
            get { return _email; }
        }
        [DataMember]
        public string PasswordQuestion
        {
            set { _passwordquestion = value; }
            get { return _passwordquestion; }
        }
        [DataMember]
        public string PasswordAnswer
        {
            set { _passwordanswer = value; }
            get { return _passwordanswer; }
        }
        [DataMember]
        public bool IsApproved
        {
            set { _isapproved = value; }
            get { return _isapproved; }
        }
        [DataMember]
        public bool IsLockedOut
        {
            set { _islockedout = value; }
            get { return _islockedout; }
        }
        [DataMember]
        public DateTime? LastLoginDate
        {
            set { _lastlogindate = value; }
            get { return _lastlogindate; }
        }
        [DataMember]
        public DateTime? LastPasswordChangedDate
        {
            set { _lastpasswordchangeddate = value; }
            get { return _lastpasswordchangeddate; }
        }
        [DataMember]
        public DateTime? LastLockoutDate
        {
            set { _lastlockoutdate = value; }
            get { return _lastlockoutdate; }
        }
        [DataMember]
        public int? FailedPasswordAttemptCount
        {
            set { _failedpasswordattemptcount = value; }
            get { return _failedpasswordattemptcount; }
        }
        [DataMember]
        public DateTime? FailedPasswordAttemptWindowStart
        {
            set { _failedpasswordattemptwindowstart = value; }
            get { return _failedpasswordattemptwindowstart; }
        }
        [DataMember]
        public int? FailedPasswordAnswerAttemptCount
        {
            set { _failedpasswordanswerattemptcount = value; }
            get { return _failedpasswordanswerattemptcount; }
        }
        [DataMember]
        public DateTime? FailedPasswordAnswerAttemptWindowStart
        {
            set { _failedpasswordanswerattemptwindowstart = value; }
            get { return _failedpasswordanswerattemptwindowstart; }
        }
        [DataMember]
        public string Remark
        {
            set { _remark = value; }
            get { return _remark; }
        }
        [DataMember]
        public string CreateName
        {
            set { _createname = value; }
            get { return _createname; }
        }
        [DataMember]
        public DateTime? CreateDate
        {
            set { _createdate = value; }
            get { return _createdate; }
        }
        [DataMember]
        public string ModifyName
        {
            set { _modifyname = value; }
            get { return _modifyname; }
        }
        [DataMember]
        public DateTime? ModifyDate
        {
            set { _modifydate = value; }
            get { return _modifydate; }
        }
        [DataMember]
        public string DeptKeyid
        {
            set { _deptkeyid = value; }
            get { return _deptkeyid; }
        }
        [DataMember]
        public string DeptCode
        {
            set { _deptcode = value; }
            get { return _deptcode; }
        }
        [DataMember]
        public string DeptName
        {
            set { _deptname = value; }
            get { return _deptname; }
        }
        [DataMember]
        public string SessionID
        {
            set { _sessionID = value; }
            get { return _sessionID; }
        }

        #endregion

        #region Contructor
        public UserDetails()
        {

           
        }
        #endregion 
    }
}
